package com.yc.oop5;

public class Test4 {
	public static void main(String[] args) {
		Shape obj = new Shape();
		obj.draw();
		
		obj = new Circle();
		obj.draw();
		
		obj = new Rect();
		obj.draw();
	}
}

class Shape{
	public void draw() {
		System.out.println("画形状");
	}
}

class Circle extends Shape{
	public void draw() {
		System.out.println("画圆");
	}
}

class Rect extends Shape{
	public void draw() {
		System.out.println("画矩形");
	}
}